
#pragma once 
#include<unistd.h>
#include"Log.hpp"
#include<fcntl.h>

void setNonBlock(int sockfd_){
        int fl = fcntl(sockfd_,F_GETFL);
        if(fl < 0)
            lg(Error,"fcntl error");
        fcntl(sockfd_,F_SETFL,fl|O_NONBLOCK);
}